
Page({
    userId:'',
    data:{
        user:{
            imge:'',
            userNickname:'lala',
            useId:'',
        }
    },
    jumpSafe(){
        wx.navigateTo({
          url: '/pages/safe/safe',
        })
    },
    jumpAdminInfor() {
        wx.navigateTo({
          url: '/pages/admin_infor/admin_infor',
        })
    },
    queryUserInfo(){
        var that = this; 
        var app = getApp();
        that.data.userId = app.data.useId;
        wx.request({
            url: 'http://localhost:8080/user/search?userId='+that.data.userId,
            method:'GET',
            header:{
                'content-type':'application/json'
            },
            success:function(res){
                that.setData({
                    user:res.data.data
                })
            }
        })
      },
      jumpLogin(){
          wx.reLaunch({
            url: '/pages/login/login',
          })
      },
      jumpAddress(){
        wx.navigateTo({
          url: '/pages/address/address',
        })
      },
      changeAdmin(){
        wx.navigateTo({
          url: '/pages/changeAdmin/changeAdmin',
        })
    },
    ButtonClick(){
        wx.reLaunch({
          url: '/pages/login/login',
        })
    },
    jumpOrder(){
        wx.navigateTo({
          url: '/pages/orderList/orderList',
        })
    },
      onShow(){
        this.queryUserInfo();
      },
    
})